import React, { PureComponent } from 'react'
import "./index.css";
import { Breadcrumb, Layout } from 'antd';
import MyMenu  from './MyMenu';
import MyContent from './MyContent/Index';
const { Header, Content, Footer, Sider } = Layout;

class Layouts extends PureComponent {
  
  // componentDidMount(){
  //   if(!sessionStorage.getItem("username")){
  //     this.props.history.push("/Login");
  //   }
  // }

  render() {
    return (
      <Layout
        style={{
          minHeight: '100vh',
        }}
      >
        <Sider collapsible >
          <div className="logo" />
          <MyMenu ></MyMenu>
        </Sider>
        <Layout className="site-layout">
          <Header
            className="site-layout-background"
            style={{
              padding: 0,
            }}
          />
          <Content
            style={{
              margin: '0 16px',
            }}
          >
            <Breadcrumb
              style={{
                margin: '16px 0',
              }}
            >
              <Breadcrumb.Item>User</Breadcrumb.Item>
              <Breadcrumb.Item>Bill</Breadcrumb.Item>
            </Breadcrumb>
            <MyContent></MyContent>
          </Content>
          <Footer
            style={{
              textAlign: 'center',
            }}
          >
            Ant Design ©2018 Created by Ant UED
          </Footer>
        </Layout>
      </Layout>
    );
  }
}


export default Layouts;